﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
namespace LiveatEdu.dao
{
    public abstract  class ConfigFile
    {
        public virtual string WindowsLiveIDAdmin { get; set; }
        public virtual string WindowsLiveIDPassword { get; set; }
        public virtual string LDAPserver { get; set; }
        public virtual string LDAPUser { get; set; }
        public virtual string LDAPPassword { get; set; }
        public virtual string SQLServerHost { get; set; }
        public virtual string SQLServerUser { get; set; }
        public virtual string SQLServerPassword { get; set; }
        public virtual string SQLServerDB { get; set; }
        public virtual string ReadMethod { get; set; }
        public virtual string StudentFileName { get; set; }
        public virtual string TeacherFileName { get; set; }
        public virtual string DisciplineFileName { get; set; }
        public virtual string TeacherXDisciplineFileName { get; set; }
        public virtual string LessionFileName { get; set; }
        public virtual string LocalPath { get; set; }
        public virtual string FTPurl { get; set; }
        public virtual string FTPUser { get; set; }
        public virtual string FTPPassword { get; set; }
        public virtual string LogFile { get; set; }

        public  ConfigFile()
        {
            AppSettingsReader reader = new AppSettingsReader();

            WindowsLiveIDAdmin = reader.GetValue("WindowsLiveIDAdmin", typeof(String)).ToString();
            WindowsLiveIDPassword = reader.GetValue("WindowsLiveIDPassword", typeof(String)).ToString();
            LDAPserver = reader.GetValue("LDAPserver", typeof(String)).ToString();
            LDAPUser = reader.GetValue("LDAPUser", typeof(String)).ToString();
            LDAPPassword = reader.GetValue("LDAPPassword", typeof(String)).ToString();
            SQLServerHost = reader.GetValue("SQLServerHost", typeof(String)).ToString();
            SQLServerUser = reader.GetValue("SQLServerUser", typeof(String)).ToString();
            SQLServerPassword = reader.GetValue("SQLServerPassword", typeof(String)).ToString();
            SQLServerDB = reader.GetValue("SQLServerDB", typeof(String)).ToString();
            ReadMethod = reader.GetValue("ReadMethod", typeof(String)).ToString();
            StudentFileName = reader.GetValue("StudentFileName", typeof(String)).ToString();
            TeacherFileName = reader.GetValue("TeacherFileName", typeof(String)).ToString();
            DisciplineFileName = reader.GetValue("DisciplineFileName", typeof(String)).ToString();
            TeacherXDisciplineFileName = reader.GetValue("TeacherXDisciplineFileName", typeof(String)).ToString();
            LessionFileName = reader.GetValue("LessionFileName", typeof(String)).ToString();
            LocalPath = reader.GetValue("LocalPath", typeof(String)).ToString();
            FTPurl = reader.GetValue("FTPurl", typeof(String)).ToString();
            FTPUser = reader.GetValue("FTPUser", typeof(String)).ToString();
            FTPPassword = reader.GetValue("FTPPassword", typeof(String)).ToString();
            LogFile = reader.GetValue("LogFile", typeof(String)).ToString();

        }
    }
}
